<template>
    <div class="goods-list">
      <div class="goods-item">
          <img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1502783926,2395759718&fm=15&gp=0.jpg" >
          <h1 class="title">小米手机Note1 16G双网通 速速来买</h1>
          <div class="info">
              <p class="price">
                  <span class="now">￥：1999</span>
                  <span class="old">￥：2999</span>
              </p>
              <p class="sell">
                  <span>热买中</span>
                  <span>剩余60件</span>
              </p>
          </div>
      </div>
      <div class="goods-item">
          <img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1502783926,2395759718&fm=15&gp=0.jpg" alt="">
          <h1 class="title">小米手机Notffddnsfl;okfljigfolke1 16G双网通 速速来买</h1>
          <div class="info">
              <p class="price">
                  <span class="now">￥：1999</span>
                  <span class="old">￥：2999</span>
              </p>
              <p class="sell">
                  <span>热买中</span>
                  <span>剩余60件</span>
              </p>
          </div>
      </div>
      <div class="goods-item">
          <img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1502783926,2395759718&fm=15&gp=0.jpg" alt="">
          <h1 class="title">小米手机Note1 16G双网通 速速来买</h1>
          <div class="info">
              <p class="price">
                  <span class="now">￥：1999</span>
                  <span class="old">￥：2999</span>
              </p>
              <p class="sell">
                  <span>热买中</span>
                  <span>剩余60件</span>
              </p>
          </div>
      </div>
    </div>
</template>
<script>
export default {
    
}
</script>
<style lang="scss" scoped>
    .goods-list{
        display: flex;
        flex-wrap: wrap;
        padding: 6px;
        justify-content: space-between;
        .goods-item{
            width: 49%;
            border: 1px solid #ccc;
            box-shadow: 0 0 8px #ccc;
            padding: 2px;
            margin: 3px 0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            // 在这里或者用父容器relative定位，子容器用absolute定位，bottom：0
            min-height: 293px;
            img{
                width: 100%;
            }
            .title{
                font-size: 16px;
                text-align: center;
            }
            .info{
                background-color: aqua;
                p{
                    margin: 0;
                    padding: 5px;
                }
                .price{
                    .now{
                        color: red;
                        font-weight: bold;
                        font-size: 16px;
                    }
                    .old{
                        text-decoration: line-through;
                        font-size: 14px;
                        margin-left:1rem;
                    }
                }
                .sell{
                    display: flex;
                    justify-content: space-between;
                    font-size: 14px;
                }
                
            }
        }
        .goods-item:hover{
            box-shadow: 8px 8px 5px #ccc;
            transform: translateX(-3px)
        }
    }    
</style>